//
//  CashChangeAlipayViewController.m
//  MJApp
//
//  Created by wangliang on 15/7/8.
//  Copyright (c) 2015年 wangliang. All rights reserved.
//

#import "CashChangeAlipayViewController.h"
#import "BandAplipayViewController.h"

@interface CashChangeAlipayViewController ()

@property (nonatomic,strong) NSDictionary *lastDic;
@property (weak, nonatomic) IBOutlet UILabel *alipayLabel;
@property (weak, nonatomic) IBOutlet UIButton *changeBtn;

@end

@implementation CashChangeAlipayViewController

- (instancetype)initWithDic:(NSDictionary *)dic {
    
    if (self = [super init]) {
        
        self.lastDic = dic;
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.title = @"修改支付宝账号";
    [self UI];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)UI {
    
     self.alipayLabel.text = self.lastDic[@"user"][@"alipay"];
    self.changeBtn.layer.cornerRadius = CGRectGetHeight(self.changeBtn.frame) / 2;
}

- (IBAction)change:(id)sender {
    
    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
    dic[@"idStr"] = @"修改支付宝账号";
    [self.navigationController pushViewController:[[BandAplipayViewController alloc] initWithDic:dic] animated:YES];

}

@end
